# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Stefano Facchini <stefano.facchini@gmail.com>

pkgname=usbredir
pkgver=0.13.0
pkgrel=1
pkgdesc="USB traffic redirection protocol"
arch=('loong64' 'x86_64')
url="https://www.spice-space.org/usbredir.html"
license=('GPL2' 'LGPL2.1')
depends=('libusb' 'glib2')
makedepends=('meson')
source=(https://spice-space.org/download/usbredir/$pkgname-$pkgver.tar.xz)
sha256sums=('4ba6faa02c0ae6deeb4c53883d66ab54b3a5899bead42ce4ded9568b9a7dc46e')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  arch-meson . build
  meson compile -C build
}

check() {
  cd "$srcdir/$pkgname-$pkgver"
  meson test -C build --print-errorlogs
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  meson install -C build --destdir="$pkgdir"
}
